<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Job Page</title>
<script type="text/javascript" src="../js/import.inc.js"></script>
<script type="text/javascript" src="../js/job.js"></script>
<script type="text/javascript" src="../js/scheduled.js"></script>
<script type="text/javascript" src="../js/queue.js"></script>
</head>
<body>
	<div class="tab-pane fade in active" id="tab2">
		<div id="job_search">
			<label>任务名:</label> 
			<input id="search_job_name" type="text" class="input-medium search-query">
			<input id="pageIndex" type="text" value="0" style="display:none">
			<input id="pageSize"  type="text" value="15" style="display:none">
			<input id="totalPage" type="text" style="display:none">
			<input id="totalSize" type="text" style="display:none">
			
			<button id="search_job_bt" class="btn">搜索</button>
			<input id="jobProfile" type="file" class="file"/>
			<button id="upload_jobProfile" class="btn">上传站点配置</button>
		</div>
		<div id='job_div' style="width: 1260px; height: 780px;overflow: auto;">
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>任务</th>
						<th>调度时间</th>
						<th>定时</th>
						<th>下一个执行任务</th>
						<th>状态</th>
						<th>开始时间</th>
						<th>队列数量</th>
						<th>队列操作</th>
						<th>异常</th>
						<th>运行操作</th>
						<th>其他操作</th>
					</tr>
				</thead>
				<tbody id="jobs">
				</tbody>
			</table>
			<div id="pageInfo">
			</div>
		</div>
		<!--<table class="table table-striped table-hover" id="reportTable1"></table>-->

		<div id="job_detail_div"
			style="display: none; width: 980px; height: 600px; font-size: 8px; overflow: auto;">
			<table border="1"
				style="margin: auto; margin-top: 20px; text-align: center;">
				<tr>
					<td colspan="4" style="font-size: 16px;font-weight:bold;">任务基本信息</td>
				</tr>
				<tr>
					<td>name</td>
					<td><input class="form-control" name="name" type="text"
						placeholder="" /></td>
					<td>level</td>
					<td><select class="form-control selectpicker" name="level">
							<option value="1">1 级任务</option>
							<option value="2">2 级任务</option>
							<option value="3">3 级任务</option>
							<option value="4">4 级任务</option>
							<option value="5">5 级任务</option>
					</select></td>
				</tr>
				<tr>
					<td>siteCode</td>
					<td><input class="form-control" name="siteCode" type="text"
						placeholder="" /></td>
					<td>queueName</td>
					<td><input class="form-control" name="queueName" type="text"
						placeholder="" /></td>
				</tr>
				<tr>
					<td>workerClass</td>
					<td><input class="form-control" name="workerClass" type="text"
						placeholder="" /></td>
					<td>resultStoreClass</td>
					<td><input class="form-control" name="resultStoreClass" type="text"
						placeholder="" /></td>
				</tr>
				<tr>
					<td>宿主节点</td>
					<td><input class="form-control" name="hostNode" type="text"
						placeholder="" /></td>
					<td>触发时间</td>
					<td><input class="form-control" name="triggerTime" type="text"
						placeholder="" /></td>
				</tr>
				<tr>
					<td>所需节点数</td>
					<td><select class="form-control selectpicker" name="needNodes">
							<option value="1">1 个节点执行</option>
							<option value="2">2 个节点执行</option>
							<option value="3">3 个节点执行</option>
							<option value="4">4 个节点执行</option>
							<option value="5">5 个节点执行</option>
					</select></td>
					<td>所需线程数</td>
					<td><select class="form-control selectpicker" id="threads">
							<option value="1">1 个线程执行</option>
							<option value="2">2 个线程执行</option>
							<option value="3">3 个线程执行</option>
							<option value="4">4 个线程执行</option>
							<option value="5">5 个线程执行</option>
					</select></td>
				</tr>
				<tr>
					<td colspan="4" style="font-size: 16px;font-weight:bold;">任务解析组件</td>
				</tr>
				<tr>
					<td colspan="4" style="font-size: 16px;font-weight:bold;">任务参数</td>
				</tr>
			</table>
		</div>
		<div id="jobSnapshot_div" style="display: none;">
			<table class="table table-striped table-hover" style="margin: auto; margin-top: 20px; text-align: center;">
				<tr style="font-size: 14px; font-weight: bold;">
					<td colspan="9" style="color:#FF0000">1:准备,&nbsp;2:等待执行,&nbsp;3:执行,&nbsp;4:暂停,&nbsp;5:停止,&nbsp;6:完成</td>
				</tr>
				<tr style="font-size: 14px; font-weight: bold;">
					<td colspan="9"><span id="jobName"></span></td>
				</tr>
				<tr style="font-size: 10px; font-weight: bold;">
					<td>开始时间</td>
					<td>结束时间</td>
					<td>状态</td>
					<td>平均每次处理时间</td>
					<td>最大处理时间</td>
					<td>最小处理时间</td>
					<td>处理数</td>
					<td>异常数</td>
					<td>异常信息</td>
				</tr>
			</table>
		</div>
		
		
		<div id="job_queue_div" style="display: none;">
			<table class="table table-striped table-hover" style="margin: auto; margin-top: 20px; text-align: center;">
				<tr style="font-size: 14px; font-weight: bold;">
					<td colspan="2">
						<span id="job_queue_div_name"></span>
						<input type="text" id="errQueueIndex" value="0" style="display:none"/>
						<input type="text" id="queueCursor" value="0" style="display:none"/>
					</td>
				</tr>
				<tr style="font-size: 10px; font-weight: bold;">
					<td>URL</td>
					<td>操作</td>
				</tr>
			</table>
		</div>
		
		
		<div id="job_worker_div" style="display: none;">
			<table class="table table-striped table-hover" style="margin: auto; margin-top: 20px; text-align: center;">
				<tr style="font-size: 14px; font-weight: bold;">
					<td colspan="12"><span id="job_worker_div_name"></span></td>
				</tr>
				<tr style="font-size: 10px; font-weight: bold;">
					<td>名称</td>
					<td>节点</td>
					<td>状态</td>
					<td>开始时间</td>
					<td>结束时间</td>
					<td>统计处理数据</td>
					<td>统计获取数据</td>
					<td>处理时间</td>
					<td>最大处理时间</td>
					<td>最小处理时间</td>
					<td>平均处理时间</td>
					<td>异常数量</td>
				</tr>
			</table>
		</div>

	</div>
</body>
</html>